<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 意见反馈 model
 *
 */
class Feedbackmodel extends CI_Model {

	function __construct()
    {
        parent::__construct();
    }
    
    /**
     * 添加意见
     *
     */
    function insert_feedback($data=array())
    {
    	if(empty($data) || !isset($data['uid']) || empty($data['uid']) ||
    		!isset($data['content']) || empty($data['content'])){
    		return false;
    	}
    	//生成id
    	$this->db->set('id', '(SELECT UUID())', FALSE);
    	$this->db->set('createtime', '(SELECT NOW())', FALSE);
    	return $this->db->insert('feedback', $data);
    }
}